﻿
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>${r'$'}{setting.siteName} - ${scheme.moduleName}管理</title>
    <meta name="keywords" content="${r'$'}{setting.siteName}">
  	<meta name="description" content="${r'$'}{setting.siteName}">

  	<!-- BEGIN HEADER -->
		[#include "/admin/include/style.ftl"]
	<!-- END HEADER -->
	<style type="text/css">
		.btn {
			margin:0 5px;
		}
	</style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                	<form id="listForm" action="list.jhtml" method="get">
                    <div class="ibox-title">
                    	 <h5>${scheme.moduleName}管理 </h5>
                    	 <div class="ibox-tools">
                    	 	<a class="btn btn-outline btn-success btn-xs" id="btn-add-loippi" href="add.jhtml"><i class="fa fa-plus"></i> 新增</a>
	                        <a class="btn btn-outline btn-danger btn-xs btn-delete-loippi-group"><i class="fa fa-trash"></i> 删除</a>
	                    </div>
                    </div>
                    <div class="ibox-content">
                    	<div class="row">
                    		<#list table.columns as column>
                            <#if column.query == 1>
	                            <#if column.mybatisJdbcType == 'VARCHAR'>
							        <div class="col-sm-3 m-b-xs">
							        <input type="text" placeholder="请输入${column.comments}" name="filter_${column.javaField}like" value="${r'$'}{(paramter.${column.javaField})!''}" class="input-sm form-control">
		                            </div>
	                            </#if>
	                            <#if column.mybatisJdbcType == 'TIMESTAMP'>
							        <div class="col-sm-4 m-b-xs">
								        <div class="input-group">
									     	<span class="input-group-addon">${column.comments}</span>
									        <input type="text" class="form-control input-sm" name="filter_${column.javaField}s" value="${r'$'}{(paramter.${column.javaField}s)!''}" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})" placeholder="选择起止时间" >
									        <span class="input-group-addon">到</span>
									        <input type="text" class="form-control input-sm" name="filter_${column.javaField}e" value="${r'$'}{(paramter.${column.javaField}e)!''}" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})" placeholder="选择结束时间">
										</div>
									</div>
	                            </#if>
	                            <#if column.mybatisJdbcType == 'INTEGER'>
							       <div class="col-sm-2 m-b-xs">
										<div class="input-group">
											<span class="input-group-addon">${column.comments}</span>
									         <select name="filter_${column.javaField}" class="input-sm form-control">
									         	<option value="">全部</option>
									            <option value="${column.comments}" [#if paramter.${column.javaField} == ${column.comments}]selected ="selected"[/#if]>${column.comments}</option>
									         </select>
									     </div>
									</div>
	                            </#if>
	                        </#if>
                        	</#list>
                           
                            <div class="col-sm-2">
                                <div class="input-group">
                                     <button type="submit" class="btn btn-sm btn-primary loippi-search-button"> 搜索</button>
                                     <button type="reset" class="btn btn-sm btn-info">重置</button>
                                </div>
                            </div>
                        </div>
						   <div class="dataTables_wrapper form-inline">
                            <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
                                <thead>
                                    <tr>

                                        <th><input type="checkbox"  class="i-checks" name="checkAll"></th>
                                        <#list table.columns as column>
                                        <#if column.list == 1>
                                        <th><#if column.comments?contains(":")><#list column.comments?split(":") as coms><#if coms_index == 0>${coms}</#if></#list><#else>${column.comments}</#if></th>
                                        </#if>
                                        </#list>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                	 [#list page.content as ${table.className?uncap_first}] 
							        	 <tr>
					                        <td>
					                            <input type="checkbox" class="i-checks" name="ids" value="${r'$'}{${table.className?uncap_first}.${table.classPk}}">
					                        </td>
					                        <#list table.columns as column>
                                        	<#if column.list == 1>
					                        <td>${r'$'}{(${table.className?uncap_first}.${column.javaField}<#if column.javaType='java.util.Date'>?string('yyyy-MM-dd'))!''<#else>)!''</#if>}</td>
					                        </#if>
                                        	</#list>
					                        <td>
					                        	<a href="${r'$'}{base}/admin/${classNamePath}/view/${r'$'}{${table.className?uncap_first}.${table.classPk}}.jhtml" class="btn btn-xs btn-default"> ${r'$'}{message("admin.common.view")} </a>
					                        	
					                        	<a class="btn btn-info btn-xs btn-edit-loippi" data-id="${r'$'}{${table.className?uncap_first}.${table.classPk}}" href="edit/${r'$'}{${table.className?uncap_first}.${table.classPk}}.jhtml" ><i class="fa fa-paste"></i> ${r'$'}{message("admin.common.edit")} </a>
					                        	
					                        	<a class="btn btn-danger btn-xs btn-delete-loippi" data-id="${r'$'}{${table.className?uncap_first}.${table.classPk}}" ><i class="fa fa-trash"></i> ${r'$'}{message("admin.common.delete")} </a>
					                        </td>
					                    </tr>
							        [/#list] 
                                </tbody>
                            </table>
                       		[@pagination pageNumber = page.pageNumber totalPages = page.totalPages]
								[#include "/admin/include/pagination.ftl"]
							[/@pagination]
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
	
	<!-- BEGIN Script -->
		[#include "/admin/include/script.ftl"]
	<!-- END Script -->
    
    <script>
    
        ${r'$'}(document).ready(function () {
        	[@flash_message /]
        });
    </script>
</body>

</html>
